function [uhat xmean ymean scalef] = normalizeImgCoord( xImg )
xio=xImg;
xmean = mean(xImg(1,:));
ymean = mean(xImg(2,:));

xImg(1,:) = xImg(1,:)-xmean;
xImg(2,:) = xImg(2,:)-ymean;

rms = sqrt( 1/2*mean(xImg(1,:).^2 + xImg(2,:).^2) );
scalef = 1/rms;

uhat = xImg / rms;
xImg = uhat;
sqrt( 1/2*mean(xImg(1,:).^2 + xImg(2,:).^2) )

breakhere = 1;